package com.roadmap.biz.common;

import java.util.List;

import org.hibernate.HibernateException;

import com.roadmap.common.BaseEntity;
import com.roadmap.exception.ActionNotSupportedException;
import com.roadmap.exception.EntityNotFoundException;
import com.roadmap.exception.InvalidActionException;
import com.roadmap.exception.InvalidQueryException;
import com.roadmap.exception.InvalidStatusException;
import com.roadmap.exception.InvalidValueException;
import com.roadmap.exception.NotAuthorizedException;
import com.roadmap.exception.NotMatchedException;
import com.roadmap.exception.NullObjectException;
import com.roadmap.exception.ServerException;

public interface IManager {

	public void setPage(int page);

	public int getPage();
	
	public int getMaxResultCount();

	public void create(BaseEntity entry) throws NullObjectException,
			InvalidValueException, ServerException, InvalidActionException,
			EntityNotFoundException, ActionNotSupportedException,
			NotAuthorizedException, InvalidStatusException;

	public void edit(BaseEntity entry) throws NullObjectException,
			InvalidValueException, ServerException, InvalidActionException,
			NotMatchedException;

	public void delete(String entryId) throws NullObjectException,
			InvalidQueryException, ServerException, InvalidValueException,
			InvalidActionException, EntityNotFoundException,
			NotAuthorizedException, ActionNotSupportedException;

	public BaseEntity complete(String entryId) throws NullObjectException,
			ServerException, InvalidValueException, EntityNotFoundException,
			InvalidActionException, NotAuthorizedException,
			ActionNotSupportedException, InvalidStatusException;

	public BaseEntity cancel(String entryId) throws NullObjectException,
			ServerException, InvalidValueException, EntityNotFoundException,
			InvalidActionException, NotAuthorizedException,
			ActionNotSupportedException;

	public BaseEntity get(String entryId) throws NullObjectException,
			InvalidQueryException, ServerException, InvalidValueException, EntityNotFoundException;

	public BaseEntity getEntityExt(String entryId) throws NullObjectException,
			InvalidQueryException, ServerException, InvalidValueException,
			EntityNotFoundException, NotMatchedException,
			NotAuthorizedException, ActionNotSupportedException;

	public List getEntitiesOfParent(String parentId) throws ServerException,
			NullObjectException, NotMatchedException, InvalidValueException,
			InvalidQueryException, EntityNotFoundException,
			NotAuthorizedException;

	public List getEntitiesOfOwner() throws ServerException,
			NullObjectException, NotMatchedException, InvalidValueException,
			InvalidQueryException;

	public List getExecutableEntities() throws HibernateException,
			ServerException, InvalidQueryException, InvalidValueException,
			NotMatchedException, ActionNotSupportedException;

	public BaseEntity getParant(String parentId) throws NullObjectException,
			InvalidQueryException, ServerException, InvalidValueException,
			EntityNotFoundException;

	public void cancel(BaseEntity entity) throws NullObjectException,
			InvalidActionException, InvalidValueException, ServerException,
			EntityNotFoundException, ActionNotSupportedException;

	public void complete(BaseEntity entity) throws NullObjectException,
			InvalidActionException, InvalidValueException, ServerException,
			EntityNotFoundException, ActionNotSupportedException,
			InvalidStatusException;
	
	public List getEntitiesByStatus(int[] states)
			throws ActionNotSupportedException, ServerException,
			InvalidValueException;
}
